package com.isoft.demo.dao;

import com.isoft.demo.entity.Permission;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface PermissionDao {
    @Select("select per_id,per_name,per_url,isused,parentid,orderid,icon from vw_permission where isused=1 and customerid=#{customerid} order by orderid")
    List<Permission>selectByLoginId(@Param("customerid") int customerid);

    @Select("select per_id,per_name,per_url,isused,parentid,orderid,icon from permissions where isused=1 and parentid=#{parentid} order by orderid")
    List<Permission>selectByParentid(@Param("parentid") Integer parentid);
}
